package test0103.test02;

// 公司、部门、职位、员工

public class Company {
    String name;
    Department[] arr = new Department[2];
    int i = 0;

    public Company() {
    }

    public Company(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Department[] getArr() {
        return arr;
    }

    public void setArr(Department[] arr) {
        this.arr = arr;
    }

    @Override
    public String toString() {
        return "Company{" +
                "name='" + name + '\'' +
                '}';
    }

    public void addDepartment(Department devDepartment) {
        arr[i] = devDepartment;
        i++;
    }
}
